<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>词多多代理商平台</title>
    <link href="__PUBLIC__/css/welcome.css" rel="stylesheet" type="text/css">
    <include file="Index:header"/>
    <script src="__PUBLIC__/js/jquery.js"></script>
    <link href="__PUBLIC__/css/smart_wizard.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__PUBLIC__/js/jquery.smartWizard-2.0.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            // Smart Wizard     
            $('#wizard').smartWizard();

            function onFinishCallback() {
                $('#wizard').smartWizard('showMessage', 'Finish Clicked');
            }

            $(function() {
                $('.theme-popover-mask').show();
                $('.theme-popover-mask').height($(document).height());
                $('.theme-popover').slideDown(200);
            })
        });

        function one() {
                var baidu = $(".baidu").val();
                var qihu = $(".qihu").val();
                var soso = $(".soso").val();
                var sogou = $(".sogou").val();

                if(baidu==""){
                    ZENG.msgbox.show('百度是必填引擎', 5, 3000);
                    return false;
                }

                if(isNaN(baidu) || isNaN(qihu) || isNaN(soso) || isNaN(sogou)){
                    ZENG.msgbox.show('请正确填写表单选项', 5, 3000);
                    return false;
                }

                var bd_nan = parseInt(baidu);
                var qh_nan = parseInt(qihu);
                var ss_nan = parseInt(soso);
                var sg_nan = parseInt(sogou);
                var sum = bd_nan+qh_nan+ss_nan+sg_nan;
                if(sum!=100){
                    ZENG.msgbox.show('请正确填写表单选项', 5, 3000);
                    return false;
                }


                $("#one").hide();
                $("#two").show();
                $("#grxx").attr("class", "current_prev");
                $("#zjxx").attr("class", "current");
        }

        function two() {
                var fir = $(".fir").val();
                var sec = $(".sec").val();
                var thr = $(".thr").val();

                if(fir==""){
                ZENG.msgbox.show('第一页是必填选项', 5, 3000);
                return false;
                }

                if(isNaN(fir) || isNaN(sec) || isNaN(thr)){
                    ZENG.msgbox.show('请正确填写表单选项', 5, 3000);
                    return false;
                }

                window.frm.submit();
        }

        function reone() {            
                $("#one").show();
                $("#two").hide();
                $("#grxx").attr("class", "current");
                $("#zjxx").attr("class", "");            
        }

    </script>
    <style type="text/css"></style>

</head>

<body>
    <div class="theme-popover-mask"></div>

    <div class="theme-popover">
        <div class="theme-poptit">
            <h1 style="font-size:14px">欢迎来到词多多代理商平台</h1>
        </div>

        <div class="formbox">
            <div class="flow_steps">
                <ul>
                    <li id="grxx" class="current" style="width:173px">搜索引擎设置</li>
                    <li id="zjxx" style="width:175px">引擎排名设置</li>
                </ul>
            </div>
            <div class="formcon">
                <div id="one">
                    <form method="post" action="{:U('Setting/set_yq')}" id="frm">
                        <table align="center">
                            <tr>
                                <td align="right" width="140px">
                                    <img src="__PUBLIC__/images/yq_baidu.gif" />
                                </td>
                                <td>
                                    <input class="baidu" type="text" placeholder="100" name="bili_baidu"/>
                                    &nbsp;&nbsp;%
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <img src="__PUBLIC__/images/yq_qh.gif" />
                                </td>
                                <td>
                                    <input class="qihu" type="text" placeholder="0" name="bili_qihu"/>
                                    &nbsp;&nbsp;%
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <img src="__PUBLIC__/images/yq_soso.gif" />
                                </td>
                                <td>
                                    <input class="soso" type="text" placeholder="0" name="bili_soso"/>
                                    &nbsp;&nbsp;%
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <img src="__PUBLIC__/images/yq_sogou.gif" />
                                </td>
                                <td>
                                    <input class="sogou" type="text" placeholder="0" name="bili_sogou"/>
                                    &nbsp;&nbsp;%
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2" width="500px">
                                    <button type="button" onclick="one()" class="button green">下一步</button>
                                </td>
                            </tr>
                        </table>

                    </div>
                    <div id="two" style="display:none">
                        <table align="center">
                            <tr>
                                <td align="right" width="140px">第一页：</td>
                                <td>
                                    <input class="fir" type="text" placeholder="100" name="pageonerate"/>
                                    &nbsp;&nbsp;%
                                </td>
                            </tr>
                            <tr>
                                <td align="right">第二页：</td>
                                <td>
                                    <input class="sec" type="text" placeholder="0" name="pagetworate"/>
                                    &nbsp;&nbsp;%
                                </td>
                            </tr>
                            <tr>
                                <td align="right">第三页：</td>
                                <td>
                                    <input class="thr" type="text" placeholder="0" name="pagethreerate"/>
                                    &nbsp;&nbsp;%
                                </td>
                            </tr>
                            <tr>
                                <td></td>
                                <td>
                                    <input type="hidden" name=""/>
                                    <button type="button" onclick="reone()" class="button green">上一步</button>
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <button type="button" class="button green" onclick="two()">提交</button>
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>

</body>

</html>